Subtyping Is Not a Good "Match" for Object-Oriented Languages
نویسندگان
چکیده
We present the design and rationale of a new statically-typed object-oriented language, LOOM. LOOM retains most of the features of the earlier language PolyTOIL. However the subtyping relation is dropped from LOOM in favor of the matching relation. \Hash types", which are de ned in terms of matching, are introduced to provide some of the bene ts of subtyping. These types can be used to provide support for heterogeneous data stuctures in LOOM. LOOM is considerably simpler than PolyTOIL, yet is just as expressive. The type system for the language is decidable and provably type safe. The addition of modules to the language provides better control over information hiding and allows the provision of access like that of C++'s friends.
منابع مشابه
Extending Moby with Inheritance-Based Subtyping
There is a great divide between the study of the foundations of object-oriented languages and the practice of mainstream object-oriented languages like JAVA[AG98] and C++[Str97]. One of the most striking examples of this divide is the rôle that class inheritance plays in defining subtyping relations. In most foundational descriptions of OO languages, and in the language designs that these studi...
متن کاملFlexible Types for a Concurrent Model
Subtyping is undoubtedly useful for the support of incremental reenement and reuse of software components , a crucial feature of object-oriented languages. Types and subtyping for concurrent languages are not yet explored suuciently and tend to be less exible than desired. We propose a principle of dealing with very exible types in concurrent languages. The corresponding type model ensures that...
متن کاملInheritance-Based Subtyping
Classes play a dual rôle in mainstream statically-typed object-oriented languages, serving as both object generators and object types. In such languages, inheritance implies subtyping. In contrast, the theoretical language community has viewed this linkage as a mistake and has focused on subtyping relationships determined by the structure of object types, without regard to their underlying impl...
متن کاملStructural Subtyping in a Distributed Object System
Object-oriented techniques increase program modularity, decrease coupling, and improve data abstraction by supporting encapsulation through narrow, rigidly deened and strongly enforced interfaces to objects. Applying object-oriented techniques to address problems of building scal-able and maintainable distributed systems seems an obvious approach since reducing coupling and increasing modularit...
متن کاملTypes for Active Objects Based on Trace Semantics
Static typing and subtyping are useful for the support of incremental reenement and reuse in object-oriented languages. Although demanded, there is currently no appropriate type model for concurrent object-oriented languages that supports dynamic behavior modiications. We propose a type model based on a process calculus with trace semantics and demonstrate its use in a simple language. This mod...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1997